home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Panasonic- / funcity / tokyo / tower.dcr / 00002_kid script.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  5.1 KB  |  210 lines

  1. property snum, cnum, movestep, fallmode
  2. global diekidnum, firerectslist, fallironmode
  3.  
  4. on birth me
  5.   set snum to 3
  6.   set cnum to the number of cast "kid_de"
  7.   set the puppet of sprite snum to 1
  8.   set the type of sprite snum to 1
  9.   set the castNum of sprite snum to cnum
  10.   set the foreColor of sprite snum to 255
  11.   set the backColor of sprite snum to 0
  12.   set the ink of sprite snum to 36
  13.   set the locH of sprite snum to 232
  14.   set the locV of sprite snum to 155
  15.   set movestep to 6
  16.   set fallmode to 0
  17.   return me
  18. end
  19.  
  20. on goleft me
  21.   if the frame >= (label("help") - 1) then
  22.     exit
  23.   end if
  24.   if fallmode then
  25.     exit
  26.   end if
  27.   if diekidnum >= 3 then
  28.     exit
  29.   end if
  30.   if the locV of sprite 1 <= 186 then
  31.     set cnum to the number of cast "lWalk.loop"
  32.   else
  33.     set cnum to the number of cast "uWalk.loop"
  34.   end if
  35.   set the castNum of sprite snum to cnum
  36.   set movestep to 6
  37.   set tlh to the locH of sprite 1
  38.   set maxwidth to getkidmovewidth(the locV of sprite 1)
  39.   if the frame mod 2 then
  40.     set the locH of sprite 1 to tlh + 4
  41.     if item 1 of maxwidth < the locH of sprite 1 then
  42.       set the locH of sprite 1 to integer(item 1 of maxwidth)
  43.     else
  44.       if fallironmode <> 0 then
  45.         set the locH of sprite fallironmode to the locH of sprite fallironmode + 4
  46.       end if
  47.     end if
  48.   end if
  49. end
  50.  
  51. on goright me
  52.   if the frame >= (label("help") - 1) then
  53.     exit
  54.   end if
  55.   if fallmode then
  56.     exit
  57.   end if
  58.   if diekidnum >= 3 then
  59.     exit
  60.   end if
  61.   if the locV of sprite 1 <= 186 then
  62.     set cnum to the number of cast "rWalk.loop"
  63.   else
  64.     set cnum to the number of cast "uWalk.loop"
  65.   end if
  66.   set the castNum of sprite snum to cnum
  67.   set movestep to 6
  68.   set tlh to the locH of sprite 1
  69.   set maxwidth to getkidmovewidth(the locV of sprite 1)
  70.   if the frame mod 2 then
  71.     set the locH of sprite 1 to tlh - 4
  72.     if item 2 of maxwidth > the locH of sprite 1 then
  73.       set the locH of sprite 1 to integer(item 2 of maxwidth)
  74.     else
  75.       if fallironmode <> 0 then
  76.         set the locH of sprite fallironmode to the locH of sprite fallironmode - 4
  77.       end if
  78.     end if
  79.   end if
  80. end
  81.  
  82. on goup me
  83.   if the frame >= (label("help") - 1) then
  84.     exit
  85.   end if
  86.   if fallmode then
  87.     exit
  88.   end if
  89.   if diekidnum >= 3 then
  90.     exit
  91.   end if
  92.   set cnum to the number of cast "uWalk.loop"
  93.   set the castNum of sprite snum to cnum
  94.   set movestep to 6
  95.   set tlv to the locV of sprite 1
  96.   if the frame mod 2 then
  97.     set the locV of sprite 1 to tlv + 4
  98.     if the locV of sprite 1 > 675 then
  99.       set the locV of sprite 1 to 675
  100.     end if
  101.     set maxwidth to getkidmovewidth(the locV of sprite 1)
  102.     if item 2 of maxwidth > the locH of sprite 1 then
  103.       set the locH of sprite 1 to integer(item 2 of maxwidth)
  104.     else
  105.       if item 1 of maxwidth < the locH of sprite 1 then
  106.         set the locH of sprite 1 to integer(item 1 of maxwidth)
  107.       end if
  108.     end if
  109.   end if
  110. end
  111.  
  112. on godown me
  113.   if the frame >= (label("help") - 1) then
  114.     exit
  115.   end if
  116.   if fallmode then
  117.     exit
  118.   end if
  119.   if diekidnum >= 3 then
  120.     exit
  121.   end if
  122.   set cnum to the number of cast "uWalk.loop"
  123.   set the castNum of sprite snum to cnum
  124.   set movestep to 6
  125.   set tlv to the locV of sprite 1
  126.   if the frame mod 2 then
  127.     set the locV of sprite 1 to tlv - 4
  128.     if the locV of sprite 1 < 155 then
  129.       set the locV of sprite 1 to 155
  130.     end if
  131.     set maxwidth to getkidmovewidth(the locV of sprite 1)
  132.     if item 2 of maxwidth > the locH of sprite 1 then
  133.       set the locH of sprite 1 to integer(item 2 of maxwidth)
  134.     else
  135.       if item 1 of maxwidth < the locH of sprite 1 then
  136.         set the locH of sprite 1 to integer(item 1 of maxwidth)
  137.       end if
  138.     end if
  139.   end if
  140. end
  141.  
  142. on checkfire me
  143.   if the optionDown then
  144.     alert(the loc of sprite 1 && count(firerectslist) & RETURN & firerectslist)
  145.     exit
  146.   end if
  147.   if the frame >= (label("help") - 1) then
  148.     exit
  149.   end if
  150.   if fallmode then
  151.     exit
  152.   end if
  153.   if diekidnum >= 3 then
  154.     exit
  155.   end if
  156.   set cnum to the number of cast "hanm.loop"
  157.   set the castNum of sprite snum to cnum
  158.   set movestep to 6
  159. end
  160.  
  161. on stopkid me
  162.   if fallmode then
  163.     fallkid(me)
  164.     exit
  165.   end if
  166.   if cnum = the number of cast "kid_de" then
  167.     exit
  168.   end if
  169.   set movestep to movestep - 1
  170.   if movestep <= 0 then
  171.     if cnum = the number of cast "hanm.loop" then
  172.       checkfirerect()
  173.     end if
  174.     set cnum to the number of cast "kid_back"
  175.     set the castNum of sprite snum to cnum
  176.   end if
  177. end
  178.  
  179. on setfallkid me
  180.   set cnum to the number of cast "kid_fall"
  181.   set the castNum of sprite snum to cnum
  182.   set fallmode to 1
  183.   puppetSound("ops")
  184. end
  185.  
  186. on fallkid me
  187.   set tlv to the locV of sprite 1
  188.   set tlv to tlv - 8
  189.   set the locV of sprite 1 to tlv
  190.   if tlv <= 155 then
  191.     set fallmode to 0
  192.     set cnum to the number of cast "kid_die"
  193.     set the castNum of sprite snum to cnum
  194.     puppetSound("hit")
  195.     set diekidnum to diekidnum + 1
  196.     set the puppet of sprite (29 + diekidnum) to 1
  197.     set the blend of sprite (29 + diekidnum) to 30
  198.     updateStage()
  199.     wait(30)
  200.     set the locV of sprite fallironmode to -40
  201.     set fallironmode to 0
  202.     if diekidnum < 3 then
  203.       set cnum to the number of cast "kid_de"
  204.       set the castNum of sprite snum to cnum
  205.     else
  206.       showscore()
  207.     end if
  208.   end if
  209. end
  210.